package fauxman.states;

import java.util.ArrayList;
import java.util.Collection;

import fauxman.DynamicElements.Ghost;
import fauxman.Enums.StateType;
import fauxman.StaticElements.PlayableArea;
import fauxman.model.WorldModel;

public abstract class GhostHouseState extends GhostState{
	protected GhostHouseState(){
		super.myStateType = StateType.GHOST_HOUSE_STATE;
	}
	
	public Collection<? extends PlayableArea> getPlayableArea(WorldModel model){
		return model.getGhostHouseArea();
	}
	
	public void setAppearance(int appearanceID, Ghost g){
		g.setNormalAppearance(appearanceID);
	}
	
	public ArrayList<int[]> validIntersectionDirections(WorldModel model, int x, int y) {
		return model.validGhostHouseAreaIntersectionDirections(x, y);
	}
	
	@Override
	public boolean isIntersection(WorldModel model, int x, int y) {
		return model.isGhostHouseAreaIntersection(x, y);
	}
	
	@Override
	public boolean shouldCalculateNextDirection(WorldModel model, int disX, int disY, int lookaheadX, int lookaheadY) {
		return true;
	}
}
